package utildb;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class TestConexion {

	public static void main(String[] args) throws SQLException {
		Transaction t = new Transaction();
		try {
			Connection con = t.getConnection();
		   
                   String ccadSql = "";
                   Statement statement = con.createStatement();
                   ccadSql = "select c1 from mysql.tmp";
		//    ccadSql = "select ccod_prod from Ven_Productos";
                   ResultSet rs = statement.executeQuery(ccadSql);                        
		    while (rs.next()) {
                        System.out.println(rs.getString("c1"));
                    }
                    
                        
			System.out.println(con);
		} catch (TransactionException e) {
			System.out.println(e);
		} finally {
			t.close();
		}
	}
}